//
//  LFGuessTableViewCell.m
//  LocalLife
//
//  Created by 李立达 on 15/11/25.
//  Copyright © 2015年 heima11. All rights reserved.
//

#import "LFGuessTableViewCell.h"

@interface LFGuessTableViewCell ()

@property (weak, nonatomic) IBOutlet UIImageView *guessImage;

@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UIImageView *starimage;
@property (weak, nonatomic) IBOutlet UILabel *introLable;

@end

@implementation LFGuessTableViewCell

-(instancetype)init
{
    if(self==[super init])
    {
    self=[[NSBundle mainBundle]loadNibNamed:@"LFGuessTableViewCell" owner:nil options:nil].lastObject;
    }
    return self;
}
- (void)awakeFromNib {
    // Initialization code
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)setModel:(LFGuess *)model
{
    _model=model;
    [self.guessImage sd_setImageWithURL:[NSURL URLWithString:model.cover]];
    self.nameLabel.text=model.name;
    self.introLable.text=model.intro;
    NSString *starstr=[NSString stringWithFormat:@"star_%@",model.score];
    self.starimage.image=[UIImage imageNamed:starstr];
}
@end
